<template>
  <el-menu :default-openeds="['1', '2', '3']" style="height: 100%; overflow-x: hidden"
           background-color="#3d5f81"
           text-color="#fff"
           active-text-color="#ffd04b"
           :collapse-transition="false"
           :collapse="isCollapse"
           router
  >
    <!-- logo -->
    <div style="height: 60px; line-height: 60px; text-align: center">
            <span style="font-size: 30px; position: relative; top: 5px; margin-right: -3px">
              <i class="el-icon-first-aid-kit" style="color:#ffffff;"></i>
            </span>
      <b style="color: white;margin-left: 5px " v-show="!isCollapse">医院管理系统</b>
    </div>
    <!-- 菜单栏-->
    <el-menu-item index="/manage">
      <i class="el-icon-location-outline"></i>
      <span slot="title">首页</span>
    </el-menu-item>

    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-discount"></i>
        <span slot="title">科室管理</span>
      </template>
      <el-menu-item index="/manage/sector">
        <i class="el-icon-monitor"></i>科室列表
      </el-menu-item>
    </el-submenu>

    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">医生管理</span>
      </template>
        <el-menu-item index="/manage/doctor">
          <i class="el-icon-user"></i>医生列表
        </el-menu-item>
    </el-submenu>

    <el-submenu index="4">
      <template slot="title">
        <i class="el-icon-moon-night"></i>
        <span slot="title">病人管理</span>
      </template>
      <el-menu-item index="/manage/patient">
        <i class="el-icon-notebook-2"></i>病人列表
      </el-menu-item>
    </el-submenu>

    <el-submenu index="5">
      <template slot="title">
        <i class="el-icon-suitcase"></i>
        <span slot="title">护士管理</span>
      </template>
      <el-menu-item index="/manage/nurse">
        <i class="el-icon-female"></i>护士列表
      </el-menu-item>
    </el-submenu>

    <el-submenu index="6">
      <template slot="title">
        <i class="el-icon-receiving"></i>
        <span slot="title">病房管理</span>
      </template>
      <el-menu-item index="/manage/room">
        <i class="el-icon-tickets"></i>病房列表
      </el-menu-item>
    </el-submenu>

    <el-submenu index="7">
      <template slot="title">
        <i class="el-icon-s-management"></i>
        <span slot="title">文件管理</span>
      </template>
      <el-menu-item index="/manage/file">
        <i class="el-icon-picture"></i>头像文件
      </el-menu-item>
    </el-submenu>

  </el-menu>
</template>

<script>
export default {
  name: "Aside",
  props: ['isCollapse']
}
</script>

<style scoped>
/*触发的颜色*/
.el-menu-item.is-active i {
  color: inherit;
}
/*菜单下每个子菜单的颜色*/
.el-menu-item i {
  color: #FFFFFF;
}
/*菜单图标颜色*/
.el-submenu__title i {
  color: #FFFFFF;
}
</style>